package com.ruoyi.hbase.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {

    private Integer code;

    private String message;

    private Object data;

    public static Result success(){
        return new Result(100,"成功",null);
    }

    public static Result success(String message){
        return new Result(100,message,null);
    }

    public static Result success(String message,Object data){
        return new Result(100,message,data);
    }

    public static Result error(){
        return new Result(200,"失败",null);
    }

    public static Result error(String message){
        return new Result(200,message,null);
    }

    public static Result error(String message,Object data){
        return new Result(200,message,data);
    }



}
